<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich">

    <h:head>
        <h:outputStylesheet library="css" name="default.css" />
        <title><ui:insert name="title">SGBD</ui:insert></title>
    </h:head>
    <h:body>
        <div id="container">
            <div id="spinnerWait" align="center">
                <ui:insert name="spinner">                    
                    <a4j:status onstart="#{rich:component('wait')}.show()"
                                onstop="#{rich:component('wait')}.hide()" />
                    <rich:popupPanel id="wait" width="140" height="80"
                                     moveable="false" resizeable="false" 
                                     style="text-align: center">
                        <h:graphicImage library="images" name="spinner.gif" alt="Please wait" />
                        <br />
                        <h:outputText value="Please wait" />
                    </rich:popupPanel>
                </ui:insert>
            </div>
            <div id="login" align="right">                
                <h:outputLink value="#{request.contextPath}/Login/login.jsf"
                              rendered="#{!loginBean.authenticated}">
                    <h:outputText value="Login" />
                </h:outputLink>
                <h:outputText value="#{loginBean.user.userid} - #{loginBean.user.groupeList.get(0)}" 
                              rendered="#{loginBean.authenticated}" styleClass="smallText" />
                <br />
                <h:form>
                    <h:commandLink action="#{loginBean.logout()}"
                                   rendered="#{loginBean.authenticated}">
                        <h:outputText value="Logout" />
                    </h:commandLink>
                </h:form>
            </div>
            <div id="content-nav">
                <ui:insert name="navigator">
                    
                </ui:insert>
            </div>
            <br />
            <div id="content">
                <ui:insert name="content">
                    content
                </ui:insert>
            </div>
        </div>
    </h:body>
</html>